home *** CD-ROM | disk | FTP | other *** search
/ Your Choice 3 / Your Choice Software Collection 3.iso / os2 / etelr21 / install.cmd < prev    next >
OS/2 REXX Batch file  |  1994-09-18  |  2KB  |  92 lines

  1. /* Pre-installation routine for E-Teller */
  2. '@echo off'
  3. 'cls'
  4. say 'E-Teller Pre-Installation'
  5. say '~~~~~~~~~~~~~~~~~~~~~~~~~'
  6. say''
  7. say 'This pre-installation routine exists solely to ensure that a user does'
  8. say 'not attempt to run the _install.exe VX-Rexx program without first moving'
  9. say 'vrobj.dll to a location within his/her libpath or, if a copy of vrobj.dll'
  10. say '2.1 already exists, deleting the copy in the current directory.'
  11. say ''
  12.  
  13. VROBJExists:
  14. say 'Do you already have vrobj.dll 2.1 installed (y/n)?'
  15. parse upper pull answer
  16. if( answer <> 'Y' & answer <> 'N' )then do
  17.    'cls'
  18.    say answer 'is not a valid selection.  Please try again.'
  19.    signal VROBJExists
  20. end
  21. if answer = 'Y' then
  22.    signal BeginInstall
  23. if answer = 'N' then do
  24.    'cls'
  25.    say 'Install VROBJ.DLL'
  26.    say '~~~~~~~~~~~~~~~~~'
  27.    signal InstallVROBJ
  28. do
  29. exit
  30.  
  31. InstallVROBJ:
  32. say''
  33. say 'On what drive is your config.sys located (enter only a drive letter)?'
  34. parse upper pull answer
  35. if Length( answer ) > 1 then
  36.    answer = Left( answer, 1 )
  37. rc = stream( answer||':\config.sys', 'c', 'query exists' )
  38. if rc = '' then do
  39.    'cls'
  40.    say 'Your config.sys file has not been located in the root of drive 'answer':.'
  41.    say 'Please try again.'
  42.    signal InstallVROBJ
  43. end
  44. config = answer||':\config.sys'
  45. call stream config, 'c', 'close'
  46. call linein config, 1, 0
  47. do forever
  48.    if lines( config ) = 0 then
  49.       leave
  50.    line = linein( config )
  51.    parse var line value '=' string
  52.    value = Translate( value )
  53.    if value = 'LIBPATH' then
  54.       leave
  55. end
  56. call stream config, 'c', 'close'
  57. if( string <> 'STRING' & string <> '' )then
  58.    do
  59.       'cls'
  60.       say 'Your libpath statement is:'
  61.       say ''
  62.       say string
  63.       say ''
  64.       say 'Please enter a path from the libpath where VROBJ.DLL should be located.'
  65.       parse pull answer
  66.       if( Right( answer, 1 ) <> '\' )then
  67.          answer = answer||'\'
  68.       'copy vrobj.dll' answer
  69.       rc = stream( answer||'vrobj.dll', 'c', 'query exists' )
  70.       if rc <> '' then
  71.          signal BeginInstall
  72.       else
  73.          do
  74.             say 'Copy unsuccessful.  Aborting.'
  75.             exit
  76.          end
  77.    end
  78. else
  79.    do
  80.       say 'Libpath statement not found.'
  81.       exit
  82.    end
  83. exit
  84.  
  85. BeginInstall:
  86. say 'Removing vrobj.dll from current directory.'
  87. 'erase vrobj.dll'
  88. say ''
  89. say 'Beginning installation...'
  90. 'start _install.exe'
  91. exit
  92.